<template>
	<view>
		<detailPage :pageUrl="pageUrl" :editFormOptions="editFormOptions" :editFormFields="editFormFields" :detailColumns="detailColumns" @masterDate="masterDate" :titel="titel"></detailPage>
	</view>
</template>
<script>
	export default {
		data(){
			return {
				titel:"",
				pageUrl:"q_delivery_request",
				editFormFields: {
					Voucher_sub: '',
					Goods_num: '',
					Total_price: '',
				},
				editFormOptions:[
				{
					title: '订单编码',
					field: 'Voucher_sub',
					readonly: true
				},
				{
					title: 'ID',
					required: true,
					field: 'Delivery_request',
					hidden: true,
					readonly: true
				},
				{
					title: '数量',
					field: 'Goods_num',
					readonly: true,
					type: 'number',
				},
				{
					title: '金额',
					field: 'Total_price',
					readonly: true
				}
			],
			detailColumns:[
				{
					field: 'Delivery_requestList',
					title: 'ID',
					hidden: true
				},
				// {
				// 	field: 'Sales_contract_voucher_sub',
				// 	title: '销售合同编码',
				// 	type: 'string'
				// },
				{
					field: 'Goods_name',
					title: '商品名称',
					type: 'string'
				},
				{
					field: 'Goods_num',
					title: '数量',
					type: 'int',
					require: true
				},
				{
					field: 'Goods_price',
					title: '单价',
					type: 'string',
					require: true
				},
				{
					field: 'Total_price',
					title: '总价',
					type: 'string',
					readonly: true
				}
			]
			}
		},
		methods:{
			masterDate(val){
				Object.assign(this.editFormFields, val);
			}
		}
	}
</script>